package jjn.daily;

import java.util.Scanner;

/**
 * @author Jjn
 * @since 2023-09-01 14:11
 */
public class LeetCode2240 {
    public long waysToBuyPensPencils(int total, int cost1, int cost2) {
        long sum = 0L;
        for (int i = 0; i <= total / cost1; i++) {
            int ways = (total - i * cost1) / cost2 + 1;
            sum += ways;
        }
        return sum;
    }
    
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int total = scanner.nextInt();
            int cost1 = scanner.nextInt();
            int cost2 = scanner.nextInt();
            long waysToBuyPensPencils = new LeetCode2240().waysToBuyPensPencils(total, cost1, cost2);
            System.out.println(waysToBuyPensPencils);
        }
    }
}
